package com.hunzi.mapper;

import com.hunzi.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;
public interface UserMapper {
    //删除用户
    int deleteByPrimaryKey(Integer uid);

    //添加用户
    int insert(User user);

    User selectByPrimaryKey(Integer uid);

    //查询所有用户
    List<User> selectAll();
    //修改用户
    int updateByPrimaryKey(User uid);

    //用户登录功能
    User loginUser(@Param ( "username" ) String username , @Param ( "password" ) String password);

    //多组合查询
    List<User> selectByWhere(User condition);

    //根据id数组一次删除多个
    void deleteByIds(int[] ids);

}